$(function ()
{
    findMsg();
})

function findMsg()
{
    let data = fontAjax('/ssjs', {}, 'get');

    let model = data.model;
    let productTypeList = data.productTypeList;
    let newList = data.newList;

    let productName = '';
    let news = '';

    if (model != null)
    {
        $('#bigTitle').html('<a href="/html/projectServer.html">' + model.bigTitle + '</a>');
        $('#smallTitle').html(model.smallTitle);
        $('#rephone').html(model.reservationPhone);
    }

    if (productTypeList != null)
    {
        for (let i = 0; i < productTypeList.length; i++)
        {
            if (i < 5)
            {
                productName += '<div>' + productTypeList[i].productType + '</div>';
            }
        }

    }
    $('#productName').html(productName);
    if (newList != null)
    {
        for (let i = 0; i < newList.length; i++)
        {
            news += '<div class="ssjs-msrt-row">\n' +
                '                            <div>\n' +
                '                                <div>[' + newList[i].type + ']</div>\n' +
                '                                <div>' + newList[i].title + '</div>\n' +
                '                            </div>\n' +
                '                            <div>' + newList[i].updateTime + '</div>\n' +
                '                        </div>';
        }
    }
    $('#news').html(news);
}